import request from '@/utils/request'
import service from '@/utils/request'

// 查询对话列表信息
export function dialoguequery() {
  return request({
    url: '/qa/group/page',
    method: 'get',
    // data: data
  })
}
// 添加对话列表
export function adddialogue(data) {
  return request({
    url: '/qa/group/create',
    method: 'post',
    data: data
  })
}
// 删除对话列表
export function deletedialogue(id) {
  return request({
    url: '/qa/group/delete?id='+id,
    method: 'delete',
  })
}
// 更新对话列表
export function putdialogue(data) {
  return request({
    url: '/qa/group/update',
    method: 'put',
    data: data
  })
}
// 过程处理
export function getProcessingProcess(id) {
  return request({
    url: '/qa/group-details-log/get?id=' + id,
    method: 'get',
    application: 'x-www-form-urlencoded'
  })
}
// 根据用户输入问题进行查询
export function getAnswersByQuestion(groupDetailsSaveReqVO) {
  return request({
    url: '/qa/group-details/create',
    method: 'post',
    data: groupDetailsSaveReqVO
  })
}
// 记录
export function getConversationDetails(pageNo, pageSize, id) {
  return request({
    url: '/qa/group-details/page?pageNo=' + pageNo + '&pageSize=' + pageSize + '&id=' + id,
    method: 'get',
    application: 'x-www-form-urlencoded'
  })
}
// 获取文件
export function queryfiles() {
  return request({
    url: '/qa/files/page',
    method: 'get',
    application: 'x-www-form-urlencoded'
  })
}
// 更新文件列表
export function putfile(data) {
  return request({
    url: '/qa/files/update',
    method: 'put',
    data: data
  })
}
// 获得文件内容分页
export function getFileDetilData(id) {
  return request({
    url: '/qa/files-details/page?id=' + id,
    method: 'get',
    application: 'x-www-form-urlencoded'
  })
}
// 删除对话列表
export function deletefile(id) {
  return request({
    url: '/qa/files/delete?id='+id,
    method: 'delete',
  })
}
// 导出退款订单 Excel
export function exportRefundExcel(query) {
  return request({
    url: '/qa/files-details/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
// 获得用户qq群
export function getQQGroupDetilData() {
  return request({
    url: 'system/user/profile/get',
    method: 'get',
    application: 'x-www-form-urlencoded'
  })
}
// 获得用户qq群
export function putQQGroupDetilData(data) {
  return request({
    url: 'system/user/profile/update-groups',
    method: 'put',
    data: data
  })
}